package com.cyy.springbootinit.service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.cyy.springbootinit.model.dto.equipmentinfo.EquipmentInfoQueryRequest;
import com.cyy.springbootinit.model.entity.EquipmentInfo;
import com.cyy.springbootinit.model.vo.EquipmentInfoVO;

import javax.servlet.http.HttpServletRequest;

/**
 * 设备信息表服务
 *
 * @author 程序员cyy</a>
 * @from cyy</a>
 */
public interface EquipmentInfoService extends IService<EquipmentInfo> {

    /**
     * 校验数据
     *
     * @param equipmentInfo
     * @param add 对创建的数据进行校验
     */
    void validEquipmentInfo(EquipmentInfo equipmentInfo, boolean add);

    /**
     * 获取查询条件
     *
     * @param equipmentInfoQueryRequest
     * @return
     */
    QueryWrapper<EquipmentInfo> getQueryWrapper(EquipmentInfoQueryRequest equipmentInfoQueryRequest);
    
    /**
     * 获取设备信息表封装
     *
     * @param equipmentInfo
     * @param request
     * @return
     */
    EquipmentInfoVO getEquipmentInfoVO(EquipmentInfo equipmentInfo, HttpServletRequest request);

    /**
     * 分页获取设备信息表封装
     *
     * @param equipmentInfoPage
     * @param request
     * @return
     */
    Page<EquipmentInfoVO> getEquipmentInfoVOPage(Page<EquipmentInfo> equipmentInfoPage, HttpServletRequest request);
}
